package com.skivingcloud.camunda.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serial;
import java.io.Serializable;
import java.util.StringJoiner;

/**
 * 审批人找人策略 实体类。
 *
 * @author skivingcloud
 * @since 2024-05-17
 */
@Schema(description = "审批人找人策略")
@Table("wf_strategy")
public class WfStrategy implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Id
    @Schema(description = "主键")
    private String id;

    /**
     * 策略名称
     */
    @Schema(description = "策略名称")
    private String strategyName;

    /**
     * 策略类型：1-本地固化策略、2-本地sql、3、服务调用
     */
    @Schema(description = "策略类型：1-本地固化策略、2-本地sql、3、服务调用")
    private String strategyType;

    /**
     * 类型是sql的情况在这配置SQL
     */
    @Schema(description = "类型是sql的情况在这配置SQL")
    private String strategySql;

    /**
     * 参数
     */
    @Schema(description = "参数")
    private String strategyParam;

    /**
     * 服务调用的时候在这儿配服务名
     */
    @Schema(description = "服务调用的时候在这儿配服务名")
    private String serverName;

    /**
     * 服务调用时的具体接口
     */
    @Schema(description = "服务调用时的具体接口")
    private String apiUrl;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getStrategyName() {
        return strategyName;
    }

    public void setStrategyName(String strategyName) {
        this.strategyName = strategyName;
    }

    public String getStrategyType() {
        return strategyType;
    }

    public void setStrategyType(String strategyType) {
        this.strategyType = strategyType;
    }

    public String getStrategySql() {
        return strategySql;
    }

    public void setStrategySql(String strategySql) {
        this.strategySql = strategySql;
    }

    public String getStrategyParam() {
        return strategyParam;
    }

    public void setStrategyParam(String strategyParam) {
        this.strategyParam = strategyParam;
    }

    public String getServerName() {
        return serverName;
    }

    public void setServerName(String serverName) {
        this.serverName = serverName;
    }

    public String getApiUrl() {
        return apiUrl;
    }

    public void setApiUrl(String apiUrl) {
        this.apiUrl = apiUrl;
    }
    
    @Override
    public String toString(){
        return new StringJoiner(", ", WfStrategy.class.getSimpleName() + "[", "]")
                .add("id='" + id + "'")
                .add("strategyName='" + strategyName + "'")
                .add("strategyType='" + strategyType + "'")
                .add("strategySql='" + strategySql + "'")
                .add("strategyParam='" + strategyParam + "'")
                .add("serverName='" + serverName + "'")
                .add("apiUrl='" + apiUrl + "'")
                .toString();
    }
}
